<?php

namespace services\models;

/**
 * This is the ActiveQuery class for [[\common\models\MemberInfoBestry]].
 *
 * @see \services\models\MemberInfoBestry
 */
class MemberInfoBestryQuery extends \yii\db\ActiveQuery
{
    /*public function active()
    {
        return $this->andWhere('[[status]]=1');
    }*/

    /**
     * @inheritdoc
     * @return \common\models\MemberInfoBestry[]|array
     */
    public function all($db = null)
    {
        return parent::all($db);
    }

    /**
     * @inheritdoc
     * @return \common\models\MemberInfoBestry|array|null
     */
    public function one($db = null)
    {
        return parent::one($db);
    }

    /**
     * 取得用户所有信息
     * @param int $bestry_uid
     * @return array|MemberInfoBestry|null
     */
    public function getAllInfobyBestryUid($bestry_uid){
        return MemberInfoBestry::find()->innerJoinWith('memberInfo')
            ->where(['uid'=>$bestry_uid])->one();
    }
}
